<#include "${viewPath}/macro/layout.ftl" />
<@layout title="查看文章">
<link rel="stylesheet" href="${request.contextPath}/editor.md-1.5.0/css/editormd.min.css">
<div class="row">
    <div class="col-md-10 col-md-offset-1">
        <ol class="breadcrumb">
            <li>业务方案</li>
            <li>资管</li>
            <li class="active">文章详情</li>
        </ol>

        <div class="page-header">
            <h4>不使用工作流解决非固定化管理模式下，业务处理
            </h4>
        </div>
        <p class="text-right">
            <span>萝卜先生</span><span>发表于3天前</span>
            <span>阅读</span><span>30</span>
            <span>收藏</span><span>5</span>
            <span>点赞</span><span>8</span>
            <span>评论</span><span>20</span>
        </p>

        <p class="text-left">
            <span>摘要</span>这是文章的简要说明
        </p>
        <#--这是文章正文内容-->
        <div class="row">
            <div class="col-md-3">
                <div id="sidebar">
                    <h4>目录</h4>
                    <div class="markdown-body editormd-preview-container" id="custom-toc-container">#custom-toc-container</div>
                </div>
            </div>
            <div class="col-md-9" >
                <div id="test-editormd-view">
                    <textarea style="display:none;" name="test-editormd-markdown-doc">###Hello world!</textarea>
                </div>
            </div>
        </div>

        <p class="text-right">
            <span>字数：1126</span>
            <span>标签：
                <span class="label label-default">工作流程</span>
                <span class="label label-default">资管</span>
            </span>
        </p>

        <hr>
        <p>
            <button class="btn btn-default"><i class="fa fa-star-o" aria-hidden="true"></i>收藏</button>
            <button class="btn btn-default"><i class="fa fa-thumbs-o-up" aria-hidden="true"></i>顶</button>
            <button class="btn btn-default"><i class="fa fa-thumbs-o-down" aria-hidden="true"></i>踩</button>
        </p>

        <div class="row">
            <div class="col-md-12">
                <div class="page-header">
                    <h4>关联文章</h4>
                </div>
                <div class="col-md-6"><a class="text-primary" href="${request.contextPath}/article/1001">Oracle表空间相关操作</a></div>
                <div class="col-md-6"><a class="text-primary" href="${request.contextPath}/article/1002">列表搜索器搜索项自定义SQL查询条件是怎么解决的</a></div>
                <div class="col-md-6"><a class="text-primary" href="${request.contextPath}/article/1003">在显示模板的Handler处理类中，调整显示模板样式</a></div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-12">
                <div class="page-header">
                    <h4>推荐文章</h4>
                </div>
                <div class="col-md-6"><a class="text-primary" href="${request.contextPath}/article/1001">Oracle表空间相关操作</a></div>
                <div class="col-md-6"><a class="text-primary" href="${request.contextPath}/article/1002">列表搜索器搜索项自定义SQL查询条件是怎么解决的</a></div>
                <div class="col-md-6"><a class="text-primary" href="${request.contextPath}/article/1003">在显示模板的Handler处理类中，调整显示模板样式</a></div>
                <div class="col-md-6"><a class="text-primary" href="${request.contextPath}/article/1006">RaxAnyApp参考指南.pdf</a></div>
                <div class="col-md-6"><a class="text-primary" href="${request.contextPath}/article/1007">PDF在HTML5插件实现在线查看</a></div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-12">
                <div class="page-header">
                    <h4>评论(8)</h4>
                </div>
                <div class="form-group">
                    <textarea type="text" style="height:150px;" class="form-control"></textarea>
                </div>
                <div class="pull-right">
                    <button class="right-block btn btn-success">发表评论</button>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-12">
                <ul class="media-list">
                    <li class="media">
                        <div class="media-left">
                            <a href="#">
                                <img class="media-object" data-src="holder.js/64x64" alt="64x64" src="" data-holder-rendered="true" style="width: 64px; height: 64px;">
                            </a>
                        </div>
                        <div class="media-body">
                            <small>1楼 2017/01/22 17:44</small>
                            <p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p>
                        </div>
                        <div class="media-right">
                            <div style="width:40px;">
                                <span>引用</span>
                                <span>删除</span>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>

    </div>


</div>
</@layout>
<script src="${request.contextPath}/editor.md-1.5.0/lib/marked.min.js"></script>
<script src="${request.contextPath}/editor.md-1.5.0/lib/prettify.min.js"></script>
<script src="${request.contextPath}/editor.md-1.5.0/lib/raphael.min.js"></script>
<script src="${request.contextPath}/editor.md-1.5.0/lib/underscore.min.js"></script>
<script src="${request.contextPath}/editor.md-1.5.0/lib/sequence-diagram.min.js"></script>
<script src="${request.contextPath}/editor.md-1.5.0/lib/flowchart.min.js"></script>
<script src="${request.contextPath}/editor.md-1.5.0/lib/jquery.flowchart.min.js"></script>

<script src="${request.contextPath}/editor.md-1.5.0/editormd.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function() {
        var editormdView;

        $.get("${request.contextPath}/test.md", function(markdown) {

            editormdView = editormd.markdownToHTML("test-editormd-view", {
                markdown        : markdown ,//+ "\r\n" + $("#append-test").text(),
                //htmlDecode      : true,       // 开启 HTML 标签解析，为了安全性，默认不开启
                htmlDecode      : "style,script,iframe",  // you can filter tags decode
                //toc             : false,
                tocm            : true,    // Using [TOCM]
                tocContainer    : "#custom-toc-container", // 自定义 ToC 容器层
                //gfm             : false,
                //tocDropdown     : true,
                // markdownSourceCode : true, // 是否保留 Markdown 源码，即是否删除保存源码的 Textarea 标签
                emoji           : true,
                taskList        : true,
                tex             : true,  // 默认不解析
                flowChart       : true,  // 默认不解析
                sequenceDiagram : true,  // 默认不解析
            });

            //console.log("返回一个 jQuery 实例 =>", testEditormdView);

            // 获取Markdown源码
            //console.log(testEditormdView.getMarkdown());

            //alert(testEditormdView.getMarkdown());
        });

    });


</script>